package net.xinshi.service.atom;

import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author <a href="mailto:liukuo@xinshi.net">liukuo</a>
 * @version 1.0
 * @description
 * @since 2017/6/27.
 */
@Service
public interface IAtomBaseService<T> {

    int save(T entity);

    int delete(Object key);

    int updateAll(T entity);

    int updateNotNull(T entity);

    T selectByKey(Object key);

    List<T> selectByExample(Object example);

    List<T> selectAll();

    List<T> selectOneAll(T entity);

    T selectByOther(T entity);

    int selectCount(T entity);

    boolean existsWithPrimaryKey(Object key);

    public int updateByExample(T record, Object example);

    public int updateByExampleSelective(T record, Object example);
}
